import request from '@/utils/request'

export function getCategoryApi(id) {
    return request({
        url: '/category',
        params: {
            id
        }
    }) 
}

// 获取二级分类列表数据
export function getCategoryFilterApi(id) {
  return request({
    url:'/category/sub/filter',
    params:{
      id
    }
  })
}

/**
 * @description: 获取导航数据
 * @data { 
     categoryId: 1005000 ,
     page: 1,
     pageSize: 20,
     sortField: 'publishTime' | 'orderNum' | 'evaluateNum'
   } 
 * @return {*}
 */
// 二级商品数据
export const getSubCategoryApi = (data) => {
  return request({
    url:'/category/goods/temporary',
    method:'POST',
    data
  })
}
